# def fab3(max):
#     n, a, b = 0, 0, 1
#     while n < max:
#         # 可迭代
#         yield b
#         # print b
#         a, b = b, a + b
#         n = n + 1
# f=fab3(int(input('请输入数字:')))
# print("f是一个可迭代对象，并没有执行函数")
# print('fab3返回的是一个iterable 对象，可以用for循环获取值')
# for n in f:
#     print(n)
#
# def g(x):
#     # 不可迭代
#     yield from range(x, 0, -1)
#     yield from range(x)
#
# print(list(g(int(input('请输入数字:')))))
# for g in g(int(input('请输入数字:'))):
#     print(g, end=',')
#
# # def foo():
# #     while True:
# #         print("foo")
# #         yield
# #         yield from bar()
# #
# # def bar():
# #     while True:
# #         print("bar")
# #         yield
# #         yield from foo()
# #
# # # 创建两个生成器对象
# # f = foo()
# # b = bar()
# #
# # # 交替调用foo()和bar()
# # for i in range(10):
# #     next(f)
# #     next(b)
# 😥
# class Debug:
#     def __init__(self):
#         self.x = 5
#
# main = Debug()  # 11
# print(main.x.__add__(6))




